//17h15 01052012 ABC
//--------------------------------------------------------
//--------------------------------------------------------


//--------------------------------------------------------
//Header

//********************************************************

//--------------------------------------------------------
//Include and defined

#include "..."

#defined ButtonChoosePeriod	PIN...
#defined ButtonChooseTime	PIN...
#defined ButtonChooseSpeed	PIN...
#defined ButtonChooseMode	PIN...

//********************************************************

//--------------------------------------------------------
//Function Prototype

//For the button 
//1 is true, 0 is false
unsigned char isButtonChoosePeriodPressed();
unsigned char isButtonChooseTimePressed();
unsigned char isButtonChooseSpeedPressed();
unsigned char isButtonChooseModePressed();
unsigned char isButtonChooseModeHolding();

//For the Mode
void SwitchToRunMode();
void SwitchToStopMode();
void SwitchToConfigureMode();

//For the initial 
void initIO(); 		//button pin, display 7seg pin
void initTimer(); 	//for counting time and PWM generator
void initMode(); 	//jump to Stop Mode


//For Timing
void LetCount();
void LetCount1min();
unsigned char isCount1minDone();

//For PWM
void SetLevel();
void EnablePWMGenerator();
void DisablePWMGenerator();

//For Display


//********************************************************


//--------------------------------------------------------
//Global variables
static unsigned char g_Mode;



//********************************************************

//--------------------------------------------------------
//Functions

//********************************************************

//--------------------------------------------------------
//Main

//********************************************************